package com.example.designpatterns.structural.decorator;

/**
 * 客户端代码
 *
 * @author scott
 */
public class Client {

    public static void main(String[] args) {
        // 创建原始咖啡对象
        Coffee coffee = new SimpleCoffee();

        // 添加装饰器
        coffee = new MilkDecorator(coffee);

        // 输出咖啡描述和价格
        System.out.println("Description: " + coffee.getDescription());
        System.out.println("Cost: " + coffee.getCost());
    }

}
